import React, { useCallback, useState } from 'react'

export default function Comp() {
  const [, reflesh] = useState()
  const hand = useCallback(() => {}, [])
  if (!window._arr) {
    window._arr = []
  }
  window._arr.push(hand)
  console.log(window._arr[0] === window._arr[1])// true
  return (
    <>
      <button onClick={() => reflesh({})}>刷新组件</button>
    </>
  )
}
